import { computed } from 'vue'
import { useStore} from 'vuex'
 
export default function(mapper, mapFun){
  const store = useStore()
  const fns = mapFun(mapper)
  const state = {}
  Object.keys(fns).forEach((key) => {
    const fn = fns[key].binds({ $store: store })
    state[key] = computed(fn)
  })
  return state
}
